#include"shm.hpp"
using namespace bit;

int main()
{
    WriteShm s;
    std::cout << "key: ";
    PrintOnHEX(s.GetKey());
    std::cout << "shmid: ";
    std::cout << s.GetShmid() << std::endl;

    //客户端每隔1s写一下：
    char* str = (char*)s.GetAddress();
    char ch = 'A';
    while(ch <= 'Z')
    {
        std::cout << "write..." << ch << std::endl;
        str[ch - 'A'] = ch;
        ch++;
        
        sleep(2);
    }
    return 0;
}